package com.wynn.dao;

import com.wynn.pojo.ManHour;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ProcedureDao {

    @Select("select * from manhour where id = #{i}")
    List<ManHour> findHourById(int i);

    @Insert("insert into manhour values(#{id},#{name},#{product},#{timing})")
    void addHour(@Param("id") String s, @Param("name")String s1,@Param("product") String s2, @Param("timing")String s3);

    @Delete("delete from manhour")
    void deleteAll();

    @Select("select * from manhour where name = #{name}")
    List<ManHour> searchByName(String name);

    @Select("select * from tt")
    float findTT();

    @Update("update tt set TT=#{tt}")
    void updateTT(float tt);

    @Select("select timing from manhour where product=#{key}")
    List<Float> findHourByModel(String key);
}
